<?php

	session_start();

	$total = 0;
	
	if (isset($_SESSION["products"])) {
		$keys = array_keys($_SESSION["products"]);
		
		foreach ($keys as $key) {
			$total = $total + $_SESSION["products"][$key]['units'];
		}
	}
	
	echo $total;

?>